<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> 
<meta charset="utf-8">
<title>135编辑器官网-一键秒刷,微信排版编辑器,微信图文排版,公众号图文编辑器,内容编辑器，无需下载</title>
<meta name="Keywords" content="135编辑器，微信编辑器，微信图文编辑器，微信图文美化编辑器，135编辑器下载,微信排版工具，微信公众号内容编辑，图文排版工具，最方便的微信编辑器，135编辑器官网" />
<meta name="Description" content="135编辑器，微信图文素材排版编辑器提供美化微信文章排版，微信公众号内容编辑的功能，样式丰富，“秒刷”一键排版，轻松编辑非常美观的微信图文消息。支持收藏样式、收藏颜色、图片素材编辑，图片水印等个性化功能。135编辑器无需下载,直接在线使用即可。网上下载的为欺骗的病毒程序。" />
<meta name="apple-mobile-web-app-capable" content="yes" />

<?php $GLOBALS['sys_version'] = ''; //置为空，使各个版本中，Combinator生成的文件名保持移植
 ?>

{{$this->Combinator->css(array('135open.css'))}}

{{$this->Combinator->script(array('jquery/jquery.min.js'))}}



<link href="/cache/bootstrap_2.css" rel="stylesheet" type="text/css" >

<script src="//static.135editor.com/js/jquery/jquery.min.js" type="text/javascript"></script>
<script src="//static.135editor.com/js/bootstrap.min.js" type="text/javascript"></script>
<script>
var BASEURL = "{{substr(Router::url('/',true),0,-1)}}";
</script>
</head>
<body>

<div style="width:860px;margin:0 auto;" >
	<form action="" method="post">
		<ul class="nav nav-tabs">
	    <li class="active"><a href="#basic-info" data-toggle="tab"><span>基本信息</span></a></li>
	    <li><a href="#category-content" data-toggle="tab"><span>内容</span></a></li>
	    </ul>
		<div class="tab-content">
			<div id="basic-info"  class="tab-pane active" > 点击内容查看选项卡隐藏的编辑器
				<script id="WxMsgContent" name="content" style="width:860px;" type="text/plain">初始化内容</script>
			</div>
		 	<div id="category-content" class="tab-pane">
		 		
				<br/>
			</div>
		</div>
		
		
		<div style="text-align:center;">
			<input type="submit" style="padding:10px 20px;" value="提交" onclick="alert($(this.form).serialize());return true;">
		</div>
		
	</form>
	<br/><hr/>
	js文件：
	<pre>
		<?php echo  htmlspecialchars('<script src="//static.135editor.com/js/jquery/jquery.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="/下载的百度编辑器目录/ueditor/ueditor.config.js"></script>
		<script src="//static.135editor.com/js/ueditor/ueditor.all.min.js"></script>
		<script src="//static.135editor.com/open/v1/a92d301d77.js?v=3074" type="text/javascript"></script>
'); 
		?>
	</pre>
	<br/><hr/>
	css代码
	<pre>
		<?php echo  htmlspecialchars('<link href="//static.135editor.com/open/v1/96619a5672.css?v=1111"  rel="stylesheet" type="text/css" />'); 
		?>
	</pre>
	<br/><hr/>
	html代码：
	<pre>
		将编辑器的区域放入form表单中，设置好name值，提交表单时，编辑器的值会自动提交
		<?php echo  htmlspecialchars('<div style="width:800px;margin:0 auto;" >
			<form action="" method="post">
				<script id="WxMsgContent" name="content" style="width:800px;" type="text/plain">初始化内容</script>
				<br/>
				<div style="text-align:center;">
					<input type="submit" style="padding:10px 20px;" value="提交" onclick="alert($(this.form).serialize());return true;">
				</div>
				
			</form>
		</div>'); 
		?>
	</pre>
	
	<br/><hr/>
	js代码：
	<pre>
<?php echo  htmlspecialchars("current_editor = UE.getEditor('WxMsgContent',{
	initialFrameHeight:600,
	open_editor: true,
	style_url : 'http://www.135editor.com/editor_styles/open?inajax=1'
});
"); 
		?>
	</pre>
</div>


<?php 
echo $this->Html->script('/js/ueditor/ueditor.config.js'); //ueditor配置文件引用网址必须与本站点域名相同。否则上传文件等弹出的窗口都为跨域编辑，不可用。
?>

{{if defined('IS_LOCALHOST') || Configure::read('debug') }}

<script src="{{Router::url('/js/ueditor/ueditor.all.min.js')}}"></script>

{{else}}

<script src="//static.135editor.com/js/ueditor/ueditor.all.min.js"></script>

{{/if}}

<?PHP echo $this->Combinator->script(array(
	'ueditor/lang/zh-cn/zh-cn.js',
	'jquery/jquery.cookie.js','jquery/jquery.mousewheel.min.js',
	'less-1.7.0.min.js',
	'135editor.js','metro-ui/slider.js',
	'ueditor/135editor.js',
	'ueditor/135open.js',
	'jquery/jquery.mixitup.min.js',
	'colorPicker.all.min.js','jqColorPicker.js',
)); ?>


<script>

current_editor = UE.getEditor('WxMsgContent',{
	initialFrameHeight:600,
	style_url : 'http://test.wx135.com/editor_styles/open?inajax=1'
});
window.onbeforeunload = function(event){
	event.returnValue = "即将离开页面，是否确认编辑的内容已使用并废弃？";
}


$(function(){
	

	$(document).on('click','#image-list .appmsg',function(){
		
		var src = $(this).find('img:first').attr('src');
		insertHtml("<img src=\""+src+"\">"); 
	})

	

	$(document).on('click','#tab-tpl-trigger',function(){ // 系统及收藏模板加载
		if($('#editor-tpls-list').html()==""){
			$('#editor-tpls-list').html('<img src="/img/ajax/circle_ball.gif"> 正在加载').load('{{$this->Html->url("/editor_styles/myTemplates?suffix=-1")}} #tpl-tab-content',function(){
				
				function favor_template_loaded(){
					
					$('#editor-tpls-list').find('.col-md-3').removeClass('col-md-3').addClass('col-md-6');
					
					$('#favorite-tpl-list-1 .pagelink a').click(function(){
						
						$('#favorite-tpl-list-1').load(this.href,function(){
							favor_template_loaded();
						});
						return false;
					});
				}
				
				favor_template_loaded();
				
				/*if( $('#personal-tpl-list-1').find('.editor-style-content').size() ==0 ){
					$('#personal-tpl-list-li').remove();
				}*/
				$('#editor-tpls-navtab a:first').tab('show');				
			})
		}		
	})

	/*插入模板 */
	$(document).on('click','#tpl-tab-content .insert-tpl-content,#tpl-tab-content .editor-style-content',function(){ //选中模板后设置编辑器的内容	
		var tid = $(this).data('id');
		var obj = $('#template-'+tid);
		
		obj.contents().filter(function() {
			return this.nodeType === 3 && $.trim($(this).text()) == "";
		}).remove();
		obj.find('p').each(function(){
			if($.trim($(this).html())=="&nbsp;") {
				$(this).html('<br/>');
			}
		});
		
		setEditorHtml(obj.html());
		
		var id = parseInt(obj.data('id'));
		
		if(id > 0){
			$('#template_id').val(id);
			$('#auto_cover_tpl').removeClass('hidden');
		}
		else{
			$('#template_id').val('');
			$('#auto_cover_tpl').addClass('hidden');
		}
		
		$('#template_name').val(obj.data('name'));
		$('#dialog-template-name').val(obj.data('name'));
		//$('#feedsModal').modal('hide');
	});
	
	$('#html-to-image').click(function(){
		clean_135helper();
		this.form.action = 'http://www.135editor.com/downloads/htmlToImage';
		this.form.submit();
	});
	
		
});

</script>
</body>
</html>
